//
// Created by liushuai on 2020/5/31.
//
#include "first_num.h"
int first_num(std::vector<int>&nums){
    int count = 0;
    int current = 0;
    for(auto num:nums){
        if(count == 0){
            count++;
            current = num;
        }else{
            if(current == num)
                count++;
            else
                count--;
        }
    }
    return current;
}
